import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


/**
 * 安装插件
 * @param {*} app vue实例
 * @link https://element-plus.org/zh-CN/component/icon.html
 */
export function installPlugins(app) {
    // 安装element-ui
    app.use(ElementPlus, {
        locale: zhCn,
        size: 'small',
    });
    // 安装图标库
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        app.component(key, component);
    }
}